/* 导航栏样式 */
.navbar {
    background-color: #21252b;
    color: #abb2bf;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    font-family: 'Source Code Pro', monospace;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-logo {
    font-weight: bold;
    color: #e06c75;
    text-decoration: none;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin: 0 1rem;
}

.nav-link {
    color: #abb2bf;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: #56b6c2;
    color: white;
}

/* 通用样式 */
body {
    font-family: 'Source Code Pro', monospace;
    background-color: #282c34;
    color: #abb2bf;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    transition: background-color 0.5s ease;
    padding-top: 60px; /* 为导航栏留出空间 */
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    backdrop-filter: blur(10px);
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 90%;
    max-width: 1200px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    background-color: rgba(255, 255, 255, 0.1);
    animation: fadeIn 1s ease;
    flex-wrap: wrap;
}

.left-panel {
    flex: 1;
    order: 1;
    margin-right: 20px;
    max-width: 400px;
}

.right-panel {
    flex: 2;
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h1 {
    color: #e06c75;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

p {
    margin: 10px 0;
    font-size: 16px;
    color: #abb2bf;
}

strong {
    color: #e06c75;
}

.editor-container {
    flex-grow: 1;
    height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background-color: #21252b;
    overflow: auto;
}

#editor {
    height: 100%;
    width: 100%;
}

#submit-btn {
    background-color: #56b6c2;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#submit-btn:hover {
    background-color: #4ea1a9;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/* CSS */
@keyframes blinkAnimation {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.blink {
    animation: blinkAnimation 1s steps(5, start) infinite;
}

/* 下拉页面样式 */
#dataDropdown {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

#dataDropdown > div {
    background-color: #fefefe;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
}

.item-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status {
    font-weight: bold;
}

.date {
    text-align: right;
}

/* 弹出框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 100px auto; /* 调整为合适的位置 */
    padding: 20px; /* 内边距 */
    border: 1px solid #888;
    width: 50%; /* 调整宽度为页面的一半 */
    position: relative;
    color: #000000;
    box-sizing: border-box; /* 确保内边距包含在宽度内 */
    display: flex;
    flex-direction: column;
}

/* 关闭按钮样式 */
.close-btn {
    background-color: #f44336; /* 红色背景 */
    color: white; /* 白色文字 */
    border: none; /* 无边框 */
    padding: 5px 10px; /* 内边距 */
    cursor: pointer; /* 鼠标悬停时显示指针 */
    border-radius: 5px; /* 圆角边框 */
    font-size: 16px; /* 文字大小 */
    position: absolute; /* 绝对定位 */
    top: 10px; /* 距离顶部10px */
    right: 10px; /* 距离右侧10px */
    z-index: 2; /* 确保按钮在最上层 */
}

.close-btn:hover {
    background-color: #da190b; /* 鼠标悬停时的背景色 */
}

.close-btn:active {
    background-color: #c5141c; /* 鼠标点击时的背景色 */
}

/* 按钮通用样式 */
.button {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    outline: none;
}

.button:hover {
    background-color: #0056b3;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.button:active {
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(2px);
}

/* 挑战下一题按钮样式 */
#next-question-btn {
    background-color: #4CAF50; /* 绿色背景 */
    color: white; /* 白色文字 */
    padding: 10px 20px; /* 内边距 */
    font-size: 16px; /* 字体大小 */
    font-weight: bold; /* 字体加粗 */
    border: none; /* 无边框 */
    border-radius: 5px; /* 圆角边框 */
    cursor: pointer; /* 鼠标悬停时显示手型指针 */
    transition: background-color 0.3s ease; /* 平滑过渡效果 */
    outline: none; /* 去除焦点时的轮廓线 */
    margin-top: 10px; /* 与上方元素的间距 */
}

/* 悬停时的样式 */
#next-question-btn:hover {
    background-color: #45a049; /* 鼠标悬停时背景颜色加深 */
}

/* 点击时的样式 */
#next-question-btn:active {
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3); /* 点击时的阴影为内阴影 */
    transform: translateY(2px); /* 点击时按钮下移，产生按下效果 */
}

#submit-record-btn {
    margin-left: 20px;
    background-color: #4CAF50;
}

#submit-record-btn:hover {
    background-color: #45a049;
}